package com.yf.exam.score.controller;


import com.yf.exam.core.api.ApiRest;
import com.yf.exam.core.api.controller.BaseController;
import com.yf.exam.modules.exam.dto.request.ExamSaveReqDTO;
import com.yf.exam.score.bean.ScoreGptAnswer;
import com.yf.exam.score.bean.ScoreGptRequest;
import com.yf.exam.score.service.GptService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author : xascgcs
 */
@RestController
@RequestMapping("/score")
public class ChatController extends BaseController {

    @Resource
    GptService gptService;

    @PostMapping("/gptAnswer")
    public ApiRest<ScoreGptAnswer> chat(@RequestBody ScoreGptRequest gptRequest){

        ScoreGptAnswer gptScore = gptService.getGptScore(gptRequest);

        return super.success(gptScore);
    }
}